﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FriendAnalyzer.TestMocks
{
    public class ProcessedMatrixProvider
    {
        static Random rand = new Random();
        public static Dictionary<FriendNode, List<FriendNode>> GetRandomFriendNodes(int n, int kCenters)
        {//clusters , 
            Dictionary<FriendNode, List<FriendNode>> friendClusters = new Dictionary<FriendNode, List<FriendNode>>();
            int friendsInCluster = n / kCenters;
            for (int i = 0; i < kCenters; i++)
            {
                FriendNode leader = new FriendNode();
                leader.Name = "Cluster " + i.ToString();
                List<FriendNode> slaves = new List<FriendNode>();
                for (int j = 0; j < n; j++)
                {
                    FriendNode slave = new FriendNode();
                    slave.Name = i.ToString()+ ":" + j.ToString();
                    slave.distToClusterParent = rand.NextDouble();
                    slaves.Add(slave);
                }
                friendClusters.Add(leader, slaves);
            }
            return friendClusters;
        }
        public static bool Leader(int x)
        {
            if (x > 5)
                return true;
            else
                return false;
        }
    }
    // pe i o sa am userii(cu tot cu KL)
    // pe j coloane o sa am KL 
    //select dist min si atasat la KL
    public class FriendNode
    {
        public double distToClusterParent;
        public string Name;
        public string id;
        public string imageUrl;
    }



}
